// SPDX-License-Identifier: GPL-2.0

/**
 * Copyright (C) 2025 Huawei Technologies Co., Ltd.
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, see <https://www.gnu.org/licenses/>.
 */

/** @file cmanuapi_emu.h
 * @brief Emulation functionality for Kunpeng Cache Management driver calls
 *
 * @details Driver behaviour emulation without actual calls to CMAN driver, mostly for testing purposes.
 */

#if !defined(CMAN_UAPI_EMU_H)
#define CMAN_UAPI_EMU_H

#if defined(__cplusplus)
extern "C" {
#endif

#include "cmanuapi.h"

void fini_EMU(void);
int cman_uapi_init_EMU(void);
ssize_t cman_uapi_l2_partition_get_EMU(int cpu, unsigned long* dmask, unsigned long* imask);
ssize_t cman_uapi_l2_partition_set_EMU(int cpu, unsigned long dmask, unsigned long imask);
hw_info_ioctl_args_t cman_uapi_hw_info_EMU(void);
int cman_uapi_reset_l2_partition_EMU(int cpu);

#if defined(__cplusplus)
} /* extern "C" */
#endif

#endif /* CMAN_UAPI_EMU_H */
